﻿<%@ Page Title="" Language="C#" MasterPageFile="~/manage/NestedMasterPage1.master" AutoEventWireup="true" CodeBehind="area51.aspx.cs" Inherits="map.manage.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">
   <link href="../outstyle.css" rel="stylesheet" type="text/css" />
    <link href="../Stylesheet1.css" rel="stylesheet" type="text/css" />
    <script src="../js/dropdowncontent.js" type="text/javascript"></script>

    <script src="../js/mapiconmaker_packed.js" type="text/javascript"></script>
         <script src="http://ditu.google.cn/maps?file=api&amp;v=2&amp;key=ABQIAAAAA9MjP2TBxqYxBhVpW-OpKRRu9WK7kBr6UgG1CsdYn6QIvNE0PRSz6nmGnZgAI_mC8x2qRC7L3jK29Q"
        type="text/javascript"></script>
    <script type="text/javascript"> 
    var map;
 function markpos2(zlong,zlat,desc) {
    map.clearOverlays();
         var point1 = new GLatLng(zlat, zlong);
                var marker1 = new GMarker(point1);
                GEvent.addListener(marker1, "click", function() {
                         marker1.openInfoWindowHtml("标注此位置");
                     });
                     map.addOverlay(marker1);
                     map.setCenter(point1, 14);
 }
    function markpos(zlong,zlat,desc) {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map_canvas"));
        
        
        map.setMapType(G_NORMAL_MAP);
        map.addControl(new GMapTypeControl());
        map.addControl(new GLargeMapControl());        
//        map.enableContinuousZoom();
        map.enableGoogleBar();
        var center = new GLatLng(zlat,zlong);
        map.setCenter(center, 14);

        
 
             GEvent.addListener(map, "click", function(overlay, latlng) {
                 if (latlng)
                 {
                     var lat = latlng.lat();
                     var lon = latlng.lng();
                     map.clearOverlays();
                     document.getElementById("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder3_TextBox_lat").value = lat;
                     document.getElementById("ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder3_TextBox_long").value = lon;
                     var point = new GLatLng(lat, lon);
                     var marker = new GMarker(point);
                     GEvent.addListener(marker, "click", function() {
                         marker.openInfoWindowHtml("标注此位置");
                     });
                     map.addOverlay(marker);
                 }
             });
        var point1 = new GLatLng(zlat, zlong);
                var marker1 = new GMarker(point1);
                GEvent.addListener(marker1, "click", function() {
                         marker1.openInfoWindowHtml("标注此位置");
                     });
        map.addOverlay(marker1);
      }
    }
    </script> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    
        <ContentTemplate>
        <input id="Checkbox1" type="checkbox" checked="true"/>

        县:<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                onselectedindexchanged="DropDownList1_SelectedIndexChanged">
            </asp:DropDownList>
        地区:<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" 
                onselectedindexchanged="DropDownList2_SelectedIndexChanged">
            </asp:DropDownList>
             区域:<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True" onselectedindexchanged="DropDownList3_SelectedIndexChanged" 
                >
            </asp:DropDownList>
            <br />
            <hr />
            <br />
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            Width="590px" DataKeyNames="RECID" 
                CellPadding="4" ForeColor="#333333" GridLines="None" 
                onrowdeleting="GridView1_RowDeleting" 
                onselectedindexchanging="GridView1_SelectedIndexChanging" 
                BorderWidth="1px" onrowediting="GridView1_RowEditing">
                <RowStyle BackColor="#EFF3FB" />
                <Columns>                    
                  <asp:BoundField DataField="RECID" HeaderText="RECID" Visible="False" />
                    <asp:BoundField DataField="BizAreaName" HeaderText="地标名称" >
                      <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                      <asp:BoundField DataField="taobaolong" HeaderText="经度" >
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="taobaolat" HeaderText="纬度" >
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    
                   <%-- <asp:BoundField DataField="IsConfirmed"  HeaderText="是否通过" ItemStyle-HorizontalAlign="Center" />--%>
                    <asp:TemplateField>
                    <HeaderTemplate>
                    是否通过
                    </HeaderTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                    <%#GetBindCheckBoxHtml(Eval("IsConfirmed").ToString())%>
                    
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    
                    
                    <asp:CommandField ShowSelectButton="True" HeaderText="显示地图" >
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:CommandField>
                    <asp:CommandField EditText="确认" HeaderText="通过" SelectText="" 
                        ShowEditButton="True" />
                </Columns>
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <EmptyDataTemplate>
                    
                </EmptyDataTemplate>
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#2461BF" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView> 
<%--            当前记录ID: <asp:Label ID="Label_recid" runat="server" Text="RECID"></asp:Label><br />
            地标名称:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
            经度:<asp:TextBox ID="TextBox_long" runat="server"></asp:TextBox>
            纬度:<asp:TextBox ID="TextBox_lat" runat="server"></asp:TextBox><br />
            <asp:Button ID="Button1" runat="server" Text="增加" onclick="Button1_Click" /> 
            <asp:Button ID="Button2" runat="server" Text="修改" onclick="Button2_Click" /><br />--%>

        </ContentTemplate>
    </asp:UpdatePanel> 
             
            <div id="map_canvas" style="width:100%; height:360px;margin-top: 20px;"></div>
</asp:Content>
